package com.ctgu.computer.mapper;

import com.ctgu.computer.domain.dto.PageQueryDTO;
import com.ctgu.computer.domain.dto.UserPageDTO;
import com.ctgu.computer.domain.po.AdminInfo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface AdminMapper {

    @Select("select * from admin_info where admin_id=#{adminId}")
    AdminInfo selectAdminInfoById(Integer adminId);

    void updateAdminInfo(AdminInfo adminInfo);

    @MapKey("adminId")
    Map<Integer, AdminInfo> selectAdminInfoByIds(List<Integer> senderIds);

    Page<AdminInfo> list(PageQueryDTO pageQueryDTO);

    void deleteByIds(List<Long> ids);

    //void updateStatusByIds(List<Integer> ids);

    //Page<AdminInfo> list(UserPageDTO userPageDTO);

    //@MapKey("adminId")
    //Map<Integer,AdminInfo> selectAdminNameByIds(List<Integer> senderIds);

    //void update(AdminInfo newAdminInfo);
}
